package com.mystudy.concurrent;

import java.util.stream.IntStream;

/**
 * TODO:
 * -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly Test(其中Test为class类名)
 *java -server -Xcomp -XX:+UnlockDiagnosticVMOptions -XX:-Inline -XX:CompileCommand=print,VolatileTest.test
 * @author acy
 * @since 2019/06/20 16:34
 */
public class VolatileTest {
	//static int i = 1;
	static volatile int i = 1;

	public static void main(String[] args){
		addTest();
	}

	public synchronized static void addTest(){
		i++;
	}
}
